/* Copyright (c) 2011 Team A CS2340. All rights reserved.*/

package edu.gatech.teama.doctorsoffice.net;

import edu.gatech.teama.doctorsoffice.server.DataModel;

/**
 * Lookup users of a specific type
 * @author Team A
 * @version $Revision: 1.0 $
 *
 */
public class LookupUsersOfTypeMessage extends Message {

	/**
	 * Lookup users of a type
	 * @param type type to lookup users of
	 */
	public LookupUsersOfTypeMessage(String type) {
		super(type);
	}
	
	@Override // $codepro.audit.disable methodJavadoc
	public Message handle(DataModel model) {
		// TODO Auto-generated method stub
		return new UserListMessage(model.getUsersOfType((String) this.getPayload()));
	}

	@Override public String toString() { // $codepro.audit.disable methodJavadoc
		return this.getPayload().toString();
	}
	
}
